package cn.wsalix.status;

import cn.wsalix.shop.status.ProductEnum;

public enum OrderEnum {
	undone("0", "未完成的"), pending("1", "待处理"), sended("2", "已发货"), finish("5",
			"已完成订单"), cancel("6", "取消订单"), close("100", "关闭订单");
	private String code;// ,untreated("1", "未处理订单"),recived("2","已收货")
	private String title;

	OrderEnum(String code, String title) {
		this.code = code;
		this.title = title;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public static OrderEnum findByCode(String code) {
		for (OrderEnum userKind : OrderEnum.values()) {
			if (userKind.getCode().equals(code)) {
				return userKind;
			}
		}
		return null;
	}

}
